<template>
  <div>
    <!-- 2.使用图标 -->
    <el-icon @click="ck">
      <caret-left v-if="store.state.homeview.navBool" />
      <caret-right />
    </el-icon>
  </div>
</template>

<script setup lang="ts">
import { CaretRight, CaretLeft } from "@element-plus/icons-vue";
import { useStore } from "vuex";

const store = useStore();
let ck = () => {
  store.commit("SET_NAVBOOL");
};
</script>

<style scoped lang="scss">
.el-header {
  line-height: 70px; //设置图标垂直居中
  .el-icon {
    font-size: 20px; //设置图标大小
  }
}
</style>